home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2a.lha / p4-1.2a / bin / start_servers < prev   
Text File  |  1992-10-19  |  376b  |  16 lines

  1. #!/bin/sh
  2. # script to start a set of programs on a set of machines (one each)
  3. # takes as input a port number to use and a file containing machine - file
  4. # pairs 
  5. echo $1 | \
  6. awk '{if (NR==1)
  7.     {
  8.          $APORT=$1
  9.     }
  10.         else
  11.     {
  12.          printf("rsh %s %s -d -p %s &\n",$1,$2,$APORT)
  13.      printf("echo starting %s on %s with port %s\n",$2,$1,$APORT)
  14.     }
  15.      }' - $2 | /bin/sh
  16.